//
//  ST_AIDetectNoticeBottomView.swift
//  btvideo
//
//  Created by mac on 2020/3/17.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import SwifterSwift
import SnapKit

class ST_AIDetectNoticeBottomView: UIView {

    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.addSubview(root_view)
        root_view.snp.makeConstraints { (make) in
            make.width.equalTo(228)
            make.height.equalTo(20)
            make.centerX.top.equalToSuperview()
        }
        
        
        root_view.addSubview(titleLabel0)
        root_view.addSubview(titleLabel1)
        root_view.addSubview(sign_image_view)
        titleLabel0.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.bottom.equalToSuperview().offset(2)
        }
        
        titleLabel1.snp.makeConstraints { (make) in
            make.right.equalToSuperview()
            make.bottom.equalTo(titleLabel0)
        }
        
        sign_image_view.snp.makeConstraints { (make) in
            make.bottom.equalToSuperview()
            make.width.equalTo(132)
            make.height.equalTo(20)
            make.left.equalTo(titleLabel0.snp.right).offset(5)
        }
        
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
//    MARK: - properties
    fileprivate let titleAttr: [NSAttributedString.Key : Any] = [.font: UIFont.systemFont(ofSize: 12),.foregroundColor: UIColor(red: 1, green: 1, blue: 1, alpha: 1)]
    
    fileprivate lazy var titleLabel0:UILabel = {
        let label = UILabel()
        let attrString = NSMutableAttributedString(string: "由")
        attrString.addAttributes(titleAttr, range: NSRange(location: 0, length: attrString.length))
        label.attributedText = attrString
        return label
    }()
    
    fileprivate lazy var titleLabel1:UILabel = {
        let label = UILabel()
        let attrString = NSMutableAttributedString(string: "提供认证服务")
        attrString.addAttributes(titleAttr, range: NSRange(location: 0, length: attrString.length))
        label.attributedText = attrString
        return label
    }()
    
    fileprivate lazy var root_view:UIView = {
        let control = UIView()
        control.backgroundColor = .clear
        return control
    }()
    
    
    fileprivate lazy var sign_image_view:UIImageView = {
        let control = UIImageView.init(image: ST_ImageUtils.imageName("个人中心_icon_百度")!)
        return control
    }()

}

